<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
    <h5 class="modal-title">新增专题</h5>
</div>
<div class="modal-body">
	<div class="rows">
        <div class="col-xs-offset-1 col-xs-10 col-xs-offset-1">
		<!--:include('_form.html',{subject:subject}){}  -->
		</div>
	</div>
</div> 
<div class="modal-footer clearfixed">
	<div class="rows">
		<div class="col-xs-12">
		    <button type="button" class="btn btn-info btn-xs no-border"id = "saveSubject">保存</button>
		    <button type="button" class="btn btn-info btn-xs no-border" data-dismiss="modal" aria-label="Close">关闭</button>
		</div>
	</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	//save方法
	$('#saveSubject').click(function(){
		if(!validate("form-subject")){
			return false;
		}
		var params = {};
		params['uuid'] = $("#subject-uuid").val();
		params['name'] = $("#subjectName").val();
		params['pages'] = $("#subjectPages").val();
		params['templateId'] = $("#subject-template_uuid").val();
		params['remark'] = $("#subject-remark").val(); 
		$.ajax({
			type : "POST",
			url : "mnui/sub/sub/doSave",
			data : params,
			success : function(data) {
				if (data.status == "OK") {
					$("#table-subject").bootstrapTable('refresh');
					hideModal();
					TipMsg.success(data.message, 0);
				} else {
					TipMsg.error(data.message, 0);
				}
			}
		});
	});
});
</script>